#include "header/Vegetal.h"
#include "header/Ecosystem.h"

void Vegetal::update() {
    if (lifePoints <= 0) //If the vegetal begins it's round with not enough life points, it is eliminated
        eco.killEntityAt(position.X(), position.Y(), getTypeEntity());
    // Reproduction of the vegetal :-)!
    if (rand() % 100 <= expension_factor) {
        eco.addVegetal(race, expension_factor);
    }
}
